package com.yanqu.xiuxian.config.elementalbonds.enums;

import java.util.Arrays;

public enum ElementalBondsVerificationConditionType {

    NONE(0, "无"),

    TAP_COUNT(1, "玩家点击选择优伶卡时的位置坐标，坐标相同次数+1"),
    SKILL_COUNT(2, "玩家在第一回合无移动前使用刷新技能的次数"),
    GAME_COUNT(3, "玩家进行对局的次数"),
    ;

    private final int type;
    private final String desc;

    ElementalBondsVerificationConditionType(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static ElementalBondsVerificationConditionType forType(int type) {
        return Arrays.stream(ElementalBondsVerificationConditionType.values())
                .filter(elementalBondsVerificationConditionType -> elementalBondsVerificationConditionType.getType() == type)
                .findFirst()
                .orElse(NONE);
    }

    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

}
